<?php
/**
 * Author:   tangxiaowen
 * Email:    846506584@qq.com
 * Date:     2019/5/22 0022
 * Describe: 用户信息验证类
 */

namespace app\common\validate;

use think\Validate;

class User extends Validate
{
    protected $rule = [
        'user_name' => 'require',
        'user_phone' => 'require',
        'user_idcard' => 'require',
        'md5' => 'max:32',
        'auth_type' => 'require',
    ];

    protected $message = [
        'user_name' => ['require' => '用户姓名不能为空'],
        'user_phone' => ['require' => '用户手机号不能为空'],
        'user_idcard' => ['require' => '用户身份证号不能为空'],
        'md5' => ['max' => 'md5参数异常'],
        'auth_type' => ['require' => '认证类型不能为空'],
    ];

    protected $scene = [
        'isUserAccept' => ['orderId','payType'],
        'authStatus' => ['user_name','user_phone','user_idcard','auth_type'],
    ];
}